/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 表格样式优化 */
table {
    border-collapse: separate;
    border-spacing: 0;
}

th {
    position: sticky;
    top: 0;
    background-color: #f9fafb;
    z-index: 10;
}

/* 输入框焦点样式 */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* 按钮悬停效果 */
button:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

/* 标签页切换动画 */
.tab-content {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-content:not(.active) {
    opacity: 0;
    transform: translateY(10px);
}

.tab-content.active {
    opacity: 1;
    transform: translateY(0);
}

/* 状态标签样式 */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.draft {
    background-color: #f3f4f6;
    color: #4b5563;
}

.status-badge.processing {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge.pending {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-badge.completed {
    background-color: #dcfce7;
    color: #166534;
}

.status-badge.rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

/* 表单验证样式 */
.input-error {
    border-color: #ef4444 !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* 加载动画 */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式布局调整 */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr !important;
    }
    
    .flex {
        flex-direction: column;
    }
    
    .space-x-4 {
        margin-left: 0 !important;
        margin-top: 1rem;
    }
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    width: 50%;
    max-width: 600px;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 4px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* 表格行悬停效果 */
.table-row-hover:hover {
    background-color: #f8fafc;
    transition: background-color 0.2s ease;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 1rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* 必填字段标记 */
.required::after {
    content: "*";
    color: #ef4444;
    margin-left: 0.25rem;
}

/* 禁用状态样式 */
.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 成功提示样式 */
.success-message {
    background-color: #dcfce7;
    color: #166534;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* 警告提示样式 */
.warning-message {
    background-color: #fef3c7;
    color: #92400e;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* 错误提示样式 */
.error-message {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* 标签页切换按钮样式 */
.tab-button {
    position: relative;
    transition: all 0.3s ease;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #3b82f6;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-button.active::after {
    transform: scaleX(1);
}

/* 物料表操作按钮样式 */
.material-action-btn {
    transition: all 0.2s ease;
}

.material-action-btn:hover {
    transform: scale(1.05);
}

/* 表单输入框动画 */
.form-input {
    transition: all 0.3s ease;
    border-color: #e5e7eb;
}

.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.form-input.error {
    border-color: #ef4444;
}

.form-input.error:focus {
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

.validation-message {
    display: none;
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    animation: fadeIn 0.3s ease;
}

.validation-message.show {
    display: block;
}

/* 状态标签动画 */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.status-badge.pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge.processing {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-badge.completed {
    background-color: #dcfce7;
    color: #166534;
}

.status-badge.rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

/* 表格行选中效果 */
.table-row-selected {
    background-color: #ebf5ff;
}

/* 分页按钮样式 */
.pagination-btn {
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    transform: translateY(-1px);
}

/* 搜索框动画 */
.search-input {
    transition: all 0.3s ease;
}

.search-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 操作按钮组样式 */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.action-button:hover::after {
    width: 200%;
    height: 200%;
}

/* 按钮动画 */
.action-button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.action-button:hover::after {
    width: 200%;
    height: 200%;
}

/* 表格行动画 */
tr {
    transition: background-color 0.3s ease;
}

tr:hover {
    background-color: #f9fafb;
}

/* 通用动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 标签页切换动画 */
.tab-content {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-content:not(.active) {
    opacity: 0;
    transform: translateY(10px);
}

.tab-content.active {
    opacity: 1;
    transform: translateY(0);
} 